package com.qzh.req;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @packageName:com.qzh.req
 * @ClassName:UserResetPasswordReq
 * @date:2021/7/149:52
 */
public class UserResetPasswordReq{
        private Long id;


        @NotNull(message = "【密码】不能为空")
        // @Length(min = 6, max = 20, message = "【密码】6~20位")
        @Pattern(regexp = "^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,32}$", message = "【密码】至少包含 数字和英文，长度6-32")
        private String password;

        public Long getId() {
            return id;
        }

        public void setId(Long id) {
            this.id = id;
        }


        public String getPassword() {
            return password;
        }

        public void setPassword(String password) {
            this.password = password;
        }

        @Override
        public String toString() {
            StringBuilder sb = new StringBuilder();
            sb.append(getClass().getSimpleName());
            sb.append(" [");
            sb.append("Hash = ").append(hashCode());
            sb.append(", id=").append(id);
            sb.append(", password=").append(password);
            sb.append("]");
            return sb.toString();
        }
}
